package com.spn.blog.service.article;


import com.baomidou.mybatisplus.extension.service.IService;
import com.spn.blog.common.dao.pojo.Article;
import com.spn.blog.common.dao.pojo.LoginUser;
import com.spn.blog.common.dao.pojo.SysUser;
import com.spn.blog.common.vo.Result;
import com.spn.blog.common.vo.params.ArticleParam;
import com.spn.blog.common.vo.params.PageParams;

public interface ArticleService extends IService<Article> {
    Result listArticle(PageParams pageParams);

    /**
     * 热门文章
     * @param limit
     * @return
     */
    Result hotArticle(int limit);

    /**
     * 最新文章
     * @param limit
     * @return
     */
    Result newArticle(int limit);

    /**
     * 文章归档
     * @return
     */
    Result listArchives();

    /**
     * 查看文章详情
     * @param articleId
     * @return
     */
    Result findArticleById(Long articleId);

    /**
     * 文章发布服务
     * @param articleParam
     * @return
     */
    Result publish(ArticleParam articleParam, SysUser sysUser);

    Result searchArticle(String search);

    Result deleteArticleById(Long articleId);

    Result islike(Long articleId, Boolean choice, SysUser sysUser);

    Result moveArticleToES();

    Result searchHighLight(String search);

    Result getArticleReview(Integer page, Integer pageSize);

    Result isReview(String articleId, Boolean flag);

    Result getMyArticle(String status);

    Result getMyArticle(String status, LoginUser loginUser);
}
